// 导入Element Plus图标（按需导入）
import {
  HomeFilled,
  Menu,
  UserFilled,
  Setting,
  Search,
  Edit,
  Delete,
  Plus,
  Fold,
  Key,
  Folder,
  PieChart,
  ChatDotRound,
  Avatar,
  Promotion,
  Share,
  Message,
  ChatLineRound,
  Bell,
  BellFilled, Phone, User
} from '@element-plus/icons-vue';

// 定义图标类型接口
export interface IconItem {
  iconName: string; // 图标组件名（用于存储和组件渲染）
  label: string; // 图标显示名称（用于UI展示）
  component: any; // 图标组件（用于预览）
}

// 图标库列表（集中维护所有可选择的图标）
export const iconLibrary: IconItem[] = [
  { iconName: 'HomeFilled', label: '首页', component: HomeFilled },
  { iconName: 'Menu', label: '菜单', component: Menu },
  { iconName: 'Folder', label: '目录', component: Folder },
  { iconName: 'UserFilled', label: '用户', component: UserFilled },
  { iconName: 'Setting', label: '设置', component: Setting },
  { iconName: 'Key', label: '权限配置', component: Key },
  { iconName: 'Search', label: '搜索', component: Search },
  { iconName: 'Edit', label: '编辑', component: Edit },
  { iconName: 'Delete', label: '删除', component: Delete },
  { iconName: 'Plus', label: '新增', component: Plus },
  { iconName: 'Message', label: '消息管理', component: Message },
  { iconName: 'Share', label: '内容分享', component: Share },
  { iconName: 'Promotion', label: '推广', component: Promotion },
  { iconName: 'Avatar', label: '头像', component: Avatar },
  { iconName: 'ChatDotRound', label: '消息', component: ChatDotRound },
  { iconName: 'User', label: '用户', component: User },
  { iconName: 'ChatLineRound', label: '聊天记录', component: ChatLineRound }, // 历史对话记录
  { iconName: 'Phone', label: '电话管理', component: Phone },

  // 通知相关
  { iconName: 'Bell', label: '系统通知', component: Bell }, // 一般通知
  { iconName: 'BellFilled', label: '重要通知', component: BellFilled }, // 高优先级通知
];

// 导出图标名称列表（用于表单验证）
export const iconNames = iconLibrary.map(icon => icon.iconName);
